# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.


class ApplicationController < ActionController::Base
  # Pick a unique cookie name to distinguish our session data from others'
  session :session_key => '_tareas_session_id'
  
  # Configuro las caracteristicas comunes a todos los activescaffold
  ActiveScaffold.set_defaults do |config|     
      config.ignore_columns.add [:created_at, :updated_at, :created_on, :updated_on, :lock_version]   
      #config.lang = "es_es"
    
      # Abre el formulario sustituyendo a la tabla en esa misma ventana
      config.update.link.page = config.create.link.page = true

      # 'Castellanizamos' los links de active_scaffold
      config.update.link.label = 'Editar'
      config.delete.link.label = 'Borrar'  
      config.show.link.label = 'Ver'  
      config.create.link.label = 'Crear'
      config.search.link.label = 'Buscar'

      config.list.per_page = 10
    
      #OTRAS opciones que por ahora no utilizamos pero ya que las he
      #descubierto las dejamos cerca.
      # Abre el formulario en una nueva ventana 
      # config.update.link.popup= true 
      # config.update.link.inline = true 
      # config.update.link.position = true
      # config.update.link.type = :record 
      # :before, :after, :replace (x defecto)
      # config.update.link.position = :replace
  end 
end
